<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<base href="<%=basePath%>">
<%@include file="/esayuiStyle.jsp" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="js/allergy.js"></script>
<body>
<div id="tb">
	<form id="patientCondition">
		<label class="textbox-label textbox-label-left" for="drugName" style="text-align: left; height: 26px; width:60px; line-height: 26px;">过敏药品:</label>
		<input class="easyui-textbox" id="drugName" name="drugName" style="width:150px;" data-options="">
		<label class="textbox-label textbox-label-left" for="patient.name" style="text-align: left; height: 26px; margin-left:15px; width:35px; line-height: 26px;">病人:</label>
	    <input id="patient" class="easyui-combobox" name="patient.id" style="width:150px;" data-options=" 
		      url:'patient/patientall', 
		      valueField:'id', 
		      textField:'name', 
		      panelheight:'auto'
	     ">

		<a id="btn" href="javaScript:void(0)" onclick="allergySetCondition();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">serch</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="addAllergy();" data-options="iconCls:'icon-add',plain:true">添加</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="editAllergy();" data-options="iconCls:'icon-edit',plain:true">修改</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="deleteState();" data-options="iconCls:'icon-remove',plain:true">删除</a>
	</form>
</div>
<table id="allergyTable" title="allergyList" 
    data-options="url:'allergy/allergyList',fitColumns:true,striped:true,rownumbers:true,iconCls:'icon-search'">
    
    <thead>
		<tr>
			<th data-options="field:'asddsa',checkbox:true" ></th>
			<th data-options="field:'id',width:30,sortable:true,order:'desc'">病人过敏编号</th>
			<th data-options="field:'patient',width:100,formatter:allergyFormatter">病人名称</th>
			<th data-options="field:'drugName',width:100">过敏药品</th>
			<th data-options="field:'astDate',width:200">皮试时间</th>
			<th data-options="field:'astHospital',width:100">皮试医院</th>
		</tr>
    </thead>
</table>
</body>
</html>